/*
 * globals.c
 *
 * Created: 24.03.2014 17:20:41
 *  Author: markus.hufschmid
 */ 
#include "defines.h"
#include "MS5541.h"

int volatile state = IDLE;
int volatile menu_state = M_PREDIVE;
int volatile pressure_mbar;
int volatile temperature;
int volatile p_surface_mbar;
volatile int new_data;
volatile int new_state;
unsigned int dive_time;
unsigned int duration_of_dive;
uint16_t desat_time_minutes = 0;
uint16_t no_flight_time_minutes = 0;
float max_depth = 0.0;
int16_t min_temperature = 0;

int16_t shutdown_timer = 0;
uint32_t surfaced_time = 86401;		// >24 hours
float delta_time = 1.0/60.0;

float percentage_N2 = 0.79;

coeff_t calib_words;

//real time clock
uint16_t rtc_hour = 15, rtc_min = 0, rtc_sec = 0, rtc_day = 17, rtc_month = 4;
uint16_t rtc_year = 2014;

bool volatile key_left_flag = 0, key_right_flag = 0, key_down_flag = 0;

bool salt_water = true;

uint8_t percentage_O2 = 21;

float max_partial_O2 = 1.4;

float max_operating_depth = 56.7;

log_info_t log_info;
